<layout name='Layout/layout_page' />
	<ol class="breadcrumb">
		<li><a href="<{:U('Activity/index')}>">抽奖活动</a></li>
      	<li class="active">活动设置</li>
    </ol>

	<form id="ajaxForm" action="<{:U('Activity/setting')}>" method="post" class="form-horizontal form-validata">

		<div class="form-group">
			<label class="col-md-1 control-label" for="image_exts">签到积分</label>
			<div class="col-md-5">
				<input type="text"
				class="form-control"
				name="signNumber"
				id="signNumber"
				data-rule-required="true"
				data-rule-number="true"
				value="<{$list.signNumber}>"
				/> 
			</div>
		</div>

		<div class="form-group">
			<label class="col-md-1 control-label" for="image_exts">抽奖所需积分</label>
			<div class="col-md-5">
				<input type="text"
				class="form-control"
				name="point"
				id="point"
				data-rule-required="true"
				data-rule-number="true"
				value="<{$list.point}>"
				/>
			</div>
		</div>

		<div class="form-group">
			<label class="col-md-1 control-label" for="image_exts">分享可获得</label>
			<div class="col-md-5">
				<input type="text"
				class="form-control"
				name="shareNumber"
				id="shareNumber"
				data-rule-required="true"
				data-rule-number="true"
				value="<{$list.shareNumber}>"
				/>
			</div>
		</div>

		<div class="form-group">
			<label class="col-md-1 control-label" for="image_exts">奖项设置</label>
			<div class="col-md-11">
				<TABLE class="table table-hover table-bordered" border="0" cellSpacing="0" cellPadding="0" width="100%">
				  <THEAD>
					<tr>
					  <TH>名称</TH>
					  <TH>奖品</TH>
					  <TH>中奖概率(%)</TH>
					</tr>
				  </THEAD>
				  <TBODY id="tableBody">
				  	<?php 
				  	for ($i=0; $i <count($list['name']) ; $i++) { 
				  	?>
				  	<tr>
					<td><input type="text" name="name[]" class="form-control" data-rule-required="true" value="<?php echo $list['name'][$i]?>" /></td>
					<td><input type="text" name="value[]" class="form-control" data-rule-required="true" value="<?php echo $list['value'][$i]?>"/></td>
					<td><input type="text" name="probability[]" class="form-control" data-rule-required="true" data-rule-number="true" value="<?php echo $list['probability'][$i]?>"/></td>
					</tr>
				  	<?php
				  	}
				  	?>
				  </TBODY>
				</TABLE>
			</div>
		</div>
			
		<div class="form-group">
			<div class="col-md-5 col-md-offset-1">
				<button type="submit" class="btn btn-info"><i class="icon-edit icon-white"></i> 保存活动设置</button>
			</div>
		</div>
		<input type="hidden" name="dosubmit" />
		<input type="hidden" name="id" value="<{$list['id']}>" />
	</form>
</div>

<input type="hidden" id="menu_action" value="activity" />